home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Georgia Wildfire Prevention
/
Georgia Wildfire Prevention.iso
/
pc
/
media
/
dirs
/
BackUp
/
Home.dir
/
00008_Script_MovieTimer Behavior
< prev
next >
Wrap
Text File
|
2002-10-15
|
1KB
|
52 lines
--MOVIETIMER--
--Attach to movie so it can send messages to the sprites letting them know which movie is playing and how far along it is.
property SpNum, MyNum, MyName, CurrentMovie, Guard
--Captures the spritenumber, etc.
on new me
SpNum = me.spritenum
MyNum=sprite(SpNum).member.number
MyName=member(MyNum).name
CurrentMovie = "Zone"
guard = 0
end
--Sends the movie time to the sprites.
on prepareframe me
if guard = 0 then
sendallsprites(#FireUp) --initializes the sprites.
guard = 1
end if
set TheTime = sprite(Spnum).movietime
if TheTime = member(CurrentMovie).duration then
case (CurrentMovie) of
"Zone" : CurrentMovie = "Leaves"
"Leaves" : CurrentMovie = "MowGrass"
"MowGrass" : CurrentMovie = "TrimTrees"
"TrimTrees" : CurrentMovie = "Firewood"
"Firewood" : CurrentMovie = "Landscaping"
"Landscaping" : CurrentMovie = "Roofing"
"Roofing" : CurrentMovie = "SmokeDetector"
"SmokeDetector" : CurrentMovie = "BurningDebris"
"BurningDebris" : CurrentMovie = "PrescribedBurns"
"PrescribedBurns" : CurrentMovie = "KeepTools"
"KeepTools" : CurrentMovie = "Address"
"Address" : CurrentMovie = "Precautions"
end case
sprite(SpNum).membernum = member(CurrentMovie).number
end if
sendallsprites(#countercheck, TheTime, CurrentMovie)
updateStage
end